package com.clm.service;

import com.clm.dto.DishDTO;
import com.clm.dto.DishPageQueryDTO;
import com.clm.entity.Dish;
import com.clm.result.PageResult;
import com.clm.vo.DishVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author dinghuapeng
 * @Date 2023/11/1 15:36
 * @PackageName:com.clm.service.impl
 * @ClassName: DishService
 * @Description: TODO
 * @Version 1.0
 */
@Service
public interface DishService {

    /**
     * 新增菜品和对应的口味数据
     * @param dishDTO
     */
    public void saveWithFlavor(DishDTO dishDTO);

    /**
     * 菜品分页查询
     * @param dishPageQueryDTO
     * @return
     */
    PageResult pageQuery(DishPageQueryDTO dishPageQueryDTO);

    void delete(List<Long> ids);

    DishVO getByIdWithFlavor(Long id);

    /**
     * 根据菜品id修改菜品和对应的口味信息
     * @param dishDTO
     */
    void updateWithFlavor(DishDTO dishDTO);


    List<Dish> list(Long categoryId);

    void startOrStop(Long id, Integer status);

    /**
     * 条件查询菜品和口味
     * @param dish
     * @return
     */
    List<DishVO> listWithFlavor(Dish dish);
}
